export const columnsSettingThree: BasicGridColumnProps[] = [
  {
    title: '工序',
    field: 'processName',
    width: 100
  },
  {
    title: '最后一次修改时间',
    field: 'lastModificationTime'
  },
  {
    title: '物料名称',
    field: 'name'
  },
  {
    title: '配棉',
    field: 'cottonAssort'
  },
  {
    title: '号数',
    field: 'coefficientNumber'
  },
  {
    title: '颜色',
    slots: { default: 'color' },
    width: 100,
    fixed: 'right'
  },
  {
    title: '操作',
    width: '140',
    fixed: 'right'
  }
]
export const columnsSettingFour: BasicGridColumnProps[] = [
  {
    title: '工序',
    field: 'processName',
    width: 100
  },
  {
    title: '最后一次修改时间',
    field: 'lastModificationTime',
    width: 210
  },
  {
    title: '物料名称',
    field: 'name',
    width: 200
  },
  {
    title: '配棉',
    field: 'cottonAssort'
  },
  {
    title: '号数',
    field: 'coefficientNumber'
  },
  {
    title: '干定量',
    field: 'weightPerLength'
  },
  {
    title: '定量单位',
    field: 'weightPerLengthUnit'
  },
  {
    title: '回潮率（%）',
    field: 'moistureRegain'
  },
  {
    title: '制成率（%）',
    field: 'yieldRate'
  },
  {
    title: '颜色',
    slots: { default: 'color' },
    width: 100,
    fixed: 'right'
  },
  {
    title: '操作',
    width: '140',
    fixed: 'right'
  }
]

export const columnsSettingTwo: BasicGridColumnProps[] = [
  {
    title: '工序',
    field: 'processName',
    width: 100
  },
  {
    title: '最后一次修改时间',
    field: 'lastModificationTime',
    width: 210
  },
  {
    title: '物料名称',
    field: 'name',
    width: 200
  },
  {
    title: '纱支',
    field: 'yarnCount'
  },
  {
    title: '号数',
    field: 'coefficientNumber'
  },
  {
    title: '折40支系数',
    field: 'coefficient40s',
    minWidth: 100
  },
  {
    title: '系数',
    field: 'coefficient',
    minWidth: 100
  },
  {
    title: '配棉',
    field: 'cottonAssort'
  },
  {
    title: '干定量',
    field: 'weightPerLength'
  },
  {
    title: '定量单位',
    field: 'weightPerLengthUnit'
  },
  {
    title: '回潮率（%）',
    field: 'moistureRegain'
  },
  {
    title: '制成率（%）',
    field: 'yieldRate'
  },
  {
    title: '颜色',
    slots: { default: 'color' },
    width: 100,
    fixed: 'right'
  },
  {
    title: '操作',
    width: '140',
    fixed: 'right'
  }
]

export const handleColumnsCorresponding = (type) => {
  const temp: BasicGridColumnProps[] = [
    {
      title: 'e系统品种',
      field: 'name'
    },
    {
      title: '粗细联品种号',
      field: 'thirdMaterialNum'
    },
    {
      title: '品种颜色',
      slots: { default: 'color' }
    },
    {
      title: '品种描述',
      field: 'thirdMaterialColorDescription'
    }
  ]

  return type === 'main'
    ? [
        ...temp,
        {
          title: '操作',
          slots: { default: 'operate' }
        }
      ]
    : [
        ...temp,
        {
          title: '有效期',
          field: 'end'
        }
      ]
}
